pp108 : Method Properties Interface

Method Properties Interface

This topic describes the fields that you fill while adding a custom method to a WS-AppServer model.

These properties determine the behavior of the method in a model to which it is being added.

Info

The General and Other tabs are displayed only when you right-click an existing WS-AppServer model and select Add>Method. If you select a method from the Methods pane in the Method Properties interface, only the Property fields are displayed in the Method Properties pane on the right.

Tab Property Description
General Name The name of the method
Return Type

The return data type of the related object. The following data types are available for selection, depending upon your requirement.

  • Unsigned Byte (ui1) - A one-byte unsigned integer
  • Unsigned Short (ui2) - A two-byte unsigned integer
  • Unsigned Integer (ui4) - A four-byte unsigned integer
  • Unsigned Long (ui8) - An eight-byte unsigned integer
  • Short Integer (i2) - A two-byte short integer
  • Integer (i4) - A four-byte integer
  • Long Integer (i8) - An eight-byte long integer
  • Float (r4) - A floating point number with four-byte encoding
  • Double (r8) - A floating point number with double precision
  • Currency (cy) - A floating point number that represents 'currency' data types
  • Select one of the following data types to represent XML as an integer in Java:
    • NOM xml node (xml)
    • DOM Element
      Note: When either of the data types is used, the Java class ( Extension class ) for that WS-AppServer model is generated with the following code, facilitating addition of related custom logic to process XML data:
      public static org.w3c.dom.Element DOM(org.w3c.dom.Element Dom)
          {
              // TODO implement body
              return null;
          }
      To add custom logic to this Java code, you can use the getObjectData() API as shown in the following code snippet:
      /* Returns the BusObject Data as a DOM Element
      * @return Document DOM Element containing the BusObject data
      */
      public Element getObjectData() {
      	return m_objectState.getCurrentObjectDataElement();
      }
      

  • string - String
  • boolean - A value of either 0 to represent 'false' or 1 to represent 'true'
  • dateTime - A date with an optional time data
    Note: WS-AppServer always works with GMT/UTC date and time format. It is therefore recommended to follow the same format during application development. For example, in the soap method of implementation type "BsfJavaCall", the arguments of type "Date" must be handled appropriately.
  • Base64 encoded BLOB (bin.base64) - MIME-style Base64 encoded binary large object (BLOB)
  • BusObject - Any data of type 'BusObject'
  • <classtype> - Refers to an existing class in the same package or a different package that can be a data type
Package Contains the name of the package to which the method is being added. Click to browse and select the WS-AppServer Package.
Occurrence

Determines the occurrence of the method. The acceptable values are:

  • 1 - for single occurrence
  • * - for multiple occurrences
SOAP Determines if the method can be exposed as a web service
Cursor Determines if the method can accommodate cursor details
Static Indicates if the method is a static method or an instance method
Other Soap Result Determines the format of the response as a set of tuples or without tuples
Transaction

Determines if the method participates in an automatic transaction or does not automatically pariticipate in any transaction and the application takes care of starting and completing the transaction. The acceptable values are:

  • automatic - WS-AppServer controls the activity of starting and committing the transaction
  • none - The application controls the activity of starting and committing the transaction.
    When this attribute is left blank (default value), the transaction is considered as automatic and is controlled by WS-AppServer.
Implementation The implementation type of the method (whether it is a default method or a signature is provided)
Parameters Contains the parameters of the method.
Note: A newly created method does not contain any parameter. To make it operational, add parameter(s) to it.


Related tasks

Adding an Attribute to a WS-AppServer Model
Adding Custom Methods to a WS-AppServer Model
Adding Standard Methods to a WS-AppServer Model
Adding a Parameter to a Method

Related reference

Properties of the Method Element